package com.mspbots.core.ticketai.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.mspbots.core.DefaultBaseMapper;
import com.mspbots.core.ticketai.model.Board;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * com.mspbots.core.ticketai.mapper.BoardMapper
 *
 * @author Alex bob(https://github.com/vnobo)
 * @date Created by 2019/12/11
 */
@Mapper
public interface BoardMapper extends DefaultBaseMapper<Board> {

    @Override
    @Select(value = "SELECT id,tenant_id,cw_id,name,sync_time,created_time,update_time,extend, extend::jsonb ->>'$.status' as statuses " +
            "FROM tenant_board ${ew.customSqlSegment}")
    List<Board> selectList(@Param(Constants.WRAPPER) Wrapper<Board> queryWrapper);
}
